@media (min-width: 768px) {
  .modal-content {
    box-shadow: none;
  }
}

@media (max-width: 540px) {
  #subscribe-dialog {
    width: calc(100% - 40px);
  }
  #subscribe-dialog > div > ul {
    flex-wrap: wrap;
  }
  #email, #mattermost, .button-container > button  {
    width: calc(100% - 40px);
  }
}

dialog {
  position: fixed;
  top: 150px;
  width: 500px;
  overflow-y: auto;
  padding: 0;
  border-color: white;
  background: white;
}

dialog a {
  color: #0c91c3 !important;
  text-decoration: none !important;
}

.modal {
  position: fixed;
  z-index: 9999 !important;
}

.modal-content {
  border: none;
  box-shadow: none;
  margin-bottom: 20px;
}

.modal-content-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #ccc;
}

#subscribe-dialog h3 {
  font-size: 18px;
  font-weight: bold;
  margin: 0;
}

ul {
  list-style-type: none;
}

.tab-menu {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 8px;
  margin-bottom: 0;
}

.tab {
  cursor: pointer;
  font-size: 14px;
  color: #0c91c3;
  margin: .3rem;
  padding: .1rem .4rem;
  border-radius: .3rem;
  white-space: nowrap;
  display: inline-block;
}

.tab.active {
  background: #0c91c3;
  color: white;
  outline: transparent;
}

.tab-content {
  display: none;
  text-align: center;
}

.tab-content.active {
  display: block;
}

dialog label {
  font-size: 14px;
  font-weight: normal;
  
}

.input-label {
  margin-top: 10px;
}

.subscription-services {
  margin: 2em .8rem;
}

input {
  text-rendering: auto;
  color: fieldtext;
  letter-spacing: normal;
  word-spacing: normal;
  line-height: normal;
  text-transform: none;
  text-indent: 0px;
  text-shadow: none;
  display: inline-block;
  text-align: start;
  appearance: auto;
  -webkit-rtl-ordering: logical;
  cursor: text;
  background-color: field;
  margin: 0em;
  padding: 1px 0px;
  border-width: 2px;
  border-style: inset;
  border-color: light-dark(rgb(118, 118, 118), rgb(133, 133, 133));
  border-image: initial;
  padding-block: 1px;
  padding-inline: 2px;
}

::placeholder {
  color: #AAAAAA;
}

input[type="checkbox" i] {
  background-color: initial;
  cursor: default;
  appearance: auto;
  box-sizing: border-box;
  margin: 3px 3px 3px 4px;
  padding: initial;
  border: initial;
}

input[type="hidden" i] {
  appearance: none;
  background-color: initial;
  cursor: default;
  display: none !important;
  padding: initial;
  border: initial;
}

textarea, input, button {
  outline: none;
}

dialog input {
  border: 1px solid #ababab;
  padding: 10px;
  font-size: 16px;
}

dialog input, dialog button {
  margin: 0;
  border-radius: 0;
}

dialog input[type=email], dialog input[type=text], dialog input[type=url], .dialog input[type=submit], dialog button, dialog select {
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  font-size: 15px;
}

#x-tab, #rss-tab, #ical-tab {
  margin: 20px;
}

#rss-tab a, #ical-tab a {
  width: fit-content;
  border: 1px solid lightgrey;
  padding: 3px 15px;
  border-radius: 5px;
  color: black !important;
  background-color: white;
}

#rss-tab a:hover, #rss-tab a:active, #ical-tab a:hover, #ical-tab a:active  {
  background-color: #f6f7f9;
}

.services {
  margin-bottom: 20px;
}

.services-selection {
  width: 400px;
  text-align: center;
  margin-right: auto;
  margin-left: auto;
  max-width: 100%;
}

.subscription-services-selector {
  margin-bottom: 20px;
}

.subscription-services-selector .filter-toggle {
  display: flex;
  justify-content: center;
  text-align: left;
  margin: 1rem 0;
}

.subscription-services-selector .filter-toggle label {
  margin: 5px;
}

dialog input[name="subscription[filter]"] {
  -webkit-appearance: radio;
}

.services-selection .services-fields {
  display: flex;
  flex-direction: column;
  max-height: 300px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #dee2e6;
  border-radius: .25rem;
}

.services-fields label {
  display: flex;
  cursor: pointer;
  margin-bottom: 0;
  padding: 3px 8px;
  text-align: left;
  align-items: center;
}

dialog input[type=checkbox] {
  -webkit-appearance: checkbox;
}

.services-fields {
  display: block;
  padding: 5px;
  border: 1px solid #dee2e6;
  border-radius: .25rem;
}

.services-fields label {
  display: flex;
  justify-content: space-between;
}

.services-fields label:hover {
  background-color: #f6f7f9;
}

.services-fields label span:before {
  content: "\21b3 ";
  padding-left: .5rem;
}

.g-recaptcha {
  position: relative;
  z-index: 10000 !important;
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.button-container {
  display: flex;
  justify-content: center;
}

dialog button {
  width: 100%;
  max-width: 400px;
  font-size: 15px;
  padding: 11px;
  border: none;
  background: black;
  color: #fff;
  cursor: pointer;
}

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(100,100,100,0.8);
  cursor: pointer;
  pointer-events: all;
  z-index: 9998;
  display: none;
}